/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.util.ObjectUtil
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.scene.text.Text
 */
package com.gys.controller.salesReceipts;

import cn.hutool.core.util.ObjectUtil;
import com.gys.controller.BaseController;
import com.gys.controller.dataManger.ControllerManger;
import de.felixroske.jfxsupport.FXMLController;
import java.net.URL;
import java.util.ResourceBundle;
import java.util.Timer;
import java.util.TimerTask;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.text.Text;

@FXMLController
public class TipTopController
extends BaseController
implements Initializable {
    @FXML
    private Text topTitle;

    public void initialize(URL location, ResourceBundle resources) {
        ControllerManger.controllerMap.put(this.getClass().getSimpleName(), this);
    }

    public void initTitle(final String title) {
        final Timer timer = new Timer();
        if (ObjectUtil.isEmpty(this.topTitle)) {
            timer.schedule(new TimerTask(){

                @Override
                public void run() {
                    if (ObjectUtil.isNotEmpty(TipTopController.this.topTitle)) {
                        TipTopController.this.topTitle.setText(title);
                        timer.cancel();
                    }
                }
            }, 500L);
        } else {
            this.topTitle.setText(title);
        }
    }

    public Text getTopTitle() {
        return this.topTitle;
    }

    public void setTopTitle(Text topTitle) {
        this.topTitle = topTitle;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof TipTopController)) {
            return false;
        }
        TipTopController other = (TipTopController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        Text this$topTitle = this.getTopTitle();
        Text other$topTitle = other.getTopTitle();
        return !(this$topTitle == null ? other$topTitle != null : !this$topTitle.equals(other$topTitle));
    }

    protected boolean canEqual(Object other) {
        return other instanceof TipTopController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Text $topTitle = this.getTopTitle();
        result = result * 59 + ($topTitle == null ? 43 : $topTitle.hashCode());
        return result;
    }

    public String toString() {
        return "TipTopController(topTitle=" + this.getTopTitle() + ")";
    }
}

